Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HomeObject for private class methods #3897

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

raskad
Copy link
Member

@raskad raskad commented Jul 7, 2024

This PR changes the following:

  • Fix HomeObject for private class methods

@raskad raskad added bug Something isn't working execution Issues or PRs related to code execution labels Jul 7, 2024
Copy link

github-actions bot commented Jul 7, 2024

Test262 conformance changes

Test result main count PR count difference
Total 48,212 48,212 0
Passed 42,611 42,738 +127
Ignored 1,413 1,413 0
Failed 4,188 4,061 -127
Panics 0 0 0
Conformance 88.38% 88.65% +0.26%
Fixed tests (127):
test/built-ins/Temporal/PlainDateTime/prototype/subtract/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/ambiguous-date.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/argument-string-negative-fractional-units.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/non-integer-throws-rangeerror.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/argument-duration.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/argument-string-fractional-units-rounding-mode.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/builtin.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/prop-desc.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/not-a-constructor.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/options-empty.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/name.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/balance-negative-time-units.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/argument-mixed-sign.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/negative-duration.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/branding.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/ambiguous-date.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/argument-string-negative-fractional-units.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/non-integer-throws-rangeerror.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/argument-string-fractional-units-rounding-mode.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/builtin.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/prop-desc.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/not-a-constructor.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/options-empty.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/name.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/balance-negative-time-units.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/argument-mixed-sign.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/negative-duration.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/branding.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/smallestunit-plurals-accepted-string.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/largestunit-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/roundingincrement-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/round-negative-result.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/roundingincrement-undefined.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/smallestunit-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/roundingmode-undefined.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/smallestunit-string-shorthand-string.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/largestunit-undefined.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/smallestunit-undefined.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/balance-subseconds.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/balance-negative-result.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/roundingmode-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/largestunit-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-time-zone-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-minus-sign.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/smallestunit-plurals-accepted.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-multiple-calendar.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/roundingincrement-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-invalid.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/options-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/largestunit-plurals-accepted.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-calendar-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/zero-length-duration-result.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/roundingincrement-out-of-range.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/roundingmode-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/largestunit-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/smallestunit-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-time-separators.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/roundingincrement-nan.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/weeks-months.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/branding.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-time-zone-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-minus-sign.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/smallestunit-plurals-accepted.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-multiple-calendar.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-invalid.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/options-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/largestunit-plurals-accepted.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-calendar-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/roundingincrement-out-of-range.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/roundingmode-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-time-separators.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/roundingincrement-nan.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/branding.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/argument-invalid-property.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/argument-string-negative-fractional-units.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/non-integer-throws-rangeerror.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/argument-singular-properties.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/options-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/argument-mixed-sign.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/branding.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/argument-invalid-property.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/argument-string-negative-fractional-units.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/non-integer-throws-rangeerror.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/argument-singular-properties.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/options-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/argument-mixed-sign.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/branding.js (previously Failed)
test/intl402/Temporal/PlainDate/prototype/until/calendar-mismatch.js (previously Failed)
test/intl402/Temporal/PlainDate/prototype/since/calendar-mismatch.js (previously Failed)
test/language/statements/class/elements/super-access-inside-a-private-method.js (previously Failed)

@raskad
Copy link
Member Author

raskad commented Jul 7, 2024

Relevant test passing here is: test/language/statements/class/elements/super-access-inside-a-private-method.js (previously Failed).

@raskad raskad requested a review from a team July 7, 2024 23:38
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I have a small discussion point that doesn't block merging.

Comment on lines +426 to +428
self.emit(Opcode::RotateLeft, &[Operand::U8(3)]);
self.emit_opcode(Opcode::Dup);
self.emit(Opcode::RotateRight, &[Operand::U8(4)]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought: I have seen this pattern in a lot of places. Maybe it would be good to extract this operation into a common compiler method. Something like dup_indexed or similar.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totaly agree. I think this might be something for the bytecode optimizer too. I would wait for #3798 until we work on that since that is probably gonna change some things.

@nekevss nekevss requested a review from a team July 8, 2024 21:46
Copy link
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nekevss nekevss added this pull request to the merge queue Jul 8, 2024
Merged via the queue into main with commit 5bf2e92 Jul 8, 2024
13 checks passed
@nekevss nekevss deleted the fix-home-object-in-private-methods branch July 8, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants